A modular integer GCD algorithm
نویسندگان
چکیده
This paper describes the first algorithm to compute the greatest common divisor (GCD) of two n-bit integers using a modular representation for intermediate values U , V and also for the result. It is based on a reduction step, similar to one used in the accelerated algorithm [T. Jebelean, A generalization of the binary GCD algorithm, in: ISSAC ’93: International Symposium on Symbolic and Algebraic Computation, Kiev, Ukraine, 1993, pp. 111–116; K. Weber, The accelerated integer GCD algorithm, ACM Trans. Math. Softw. 21 (1995) 111–122] when U and V are close to the same size, that replaces U by (U −bV )/p, where p is one of the prime moduli and b is the unique integer in the interval (−p/2,p/2) such that b ≡ UV−1 (mod p). When the algorithm is executed on a bit common CRCW PRAM with O(n logn log log logn) processors, it takes O(n) time in the worst case. A heuristic model of the average case yields O(n/ logn) time on the same number of processors. 2004 Elsevier Inc. All rights reserved.
منابع مشابه
Some Related Functions to Integer GCD and Coprimality
We generalize a formula of B. Litow [7] and propose several new formula linked with the parallel Integer Coprimality, Integer GCD and Modular Inverse problems as well. Particularly, we find a new trigonometrical definition of the GCD of two integers a, b ≥ 1 : gcd(a, b) = 1 π ∫ π 0 cos[ (b− a)x ] sin (abx) sin(ax) sin(bx) dx. We also suggest a generalization of the GCD function to real numbers.
متن کاملFaster Quantum Number Factoring via Circuit Synthesis
A major obstacle to implementing Shor’s quantum number-factoring algorithm is the large size of modular-exponentiation circuits. We reduce this bottleneck by customizing reversible circuits for modular multiplication to individual runs of Shor’s algorithm. Our circuit-synthesis procedure exploits spectral properties of multiplication operators and constructs optimized circuits from the traces o...
متن کاملFast K-ary Reduction and Integer Gcd Algorithms
The paper presents a new fast k-ary reduction for integer GCD. It enjoys powerful properties and improves on the running time of the quite similar integer GCD algorithm of Kannan et al. Our k-ary reduction also improves on Sorenson's k-ary reductionn14] and thus favorably matches We-ber's algorithmm15]. More generally, the fast k-ary reduction also provides a basic tool for almost all the best ...
متن کاملA parallel extended GCD algorithm
A new parallel extended GCD algorithm is proposed. It matches the best existing parallel integer GCD algorithms of Sorenson and Chor and Goldreich, since it can be achieved in O (n/ logn) time using at most n1+ processors on CRCW PRAM. Sorenson and Chor and Goldreich both use a modular approach which consider the least significant bits. By contrast, our algorithm only deals with the leading bit...
متن کاملGCDHEU: Heuristic Polynomial GCD Algorithm Based on Integer GCD Computation
A heuristic algorithm, GCDHEU, is described for polynomial GCD computation over the integers. The algorithm is based on evaluation at a single large integer value (for each variable), integer GCD computation, and a single-point interpolation scheme. Timing comparisons show that this algorithm is very efficient for most univariate problems and it is also the algorithm of choice for many problems...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- J. Algorithms
دوره 54 شماره
صفحات -
تاریخ انتشار 2005